package com.ac.api.component.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.ac.api.component.entity.CpText;
import com.ac.api.component.dao.CpTextMapper;
import com.ac.api.component.service.CpTextService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author gjj
 * @since 2024-10-26
 */
@Service
public class CpTextServiceImpl extends ServiceImpl<CpTextMapper, CpText> implements CpTextService {

    @Override
    public List<CpText> list(CpText example) {
        return this.list(buildWrapper(example));
    }

    @Override
    public IPage<CpText> page(CpText example, IPage page) {
        return this.page(page,buildWrapper(example));
    }

    /**
     * 构建查询
     *
     * @param example
     * @return
     */
    private QueryWrapper<CpText> buildWrapper(CpText example) {
        QueryWrapper<CpText> wrapper     = new QueryWrapper<>();
        return wrapper;
    }

}
